// greetings.h : communications with PC terminal.
/*
 Required includes:	avr/pgmspace.h
 */

/*
 Copyright 2010 Anthony Oko, Koby Hitchen, Mara Cairo, Shaochen Xu, Tyler Lucas
 
 This file is part of the trajctrl program.
 
 trajctrl is licensed under the Apache License, Version 2.0 (the "License");
 you may not use this file except in compliance with the License.
 You may obtain a copy of the License at
 
 http://www.apache.org/licenses/LICENSE-2.0
 
 Unless required by applicable law or agreed to in writing, software
 distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
 */

#ifndef GREETING_H
#define GREETING_H

#define ENDCHAR '\r'

#include <stdint.h>
#include <string.h>
#include "../usart.h"

#include "../ledmsg.h"

struct greeting_return
{
	char user[43];
	char date[11];
	char btype[43];
	char notes[237];
	char runid[43];
	char bsize[43];
	char stages[14];
	uint8_t smask;
};

greeting_return greeting();
uint8_t *str2uint8ar(char *s, char c);
char uint82char(uint8_t u);
uint8_t char2uint8(char c);
uint8_t uint8ar2bitmask(uint8_t u[8]);

#endif
